﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using AutoMapper;
using DevWeb.Biztalk.DeploymentSettings.Data.CodeFirst;
using DevWeb.Biztalk.DeploymentSettings.WebUI.Models;

namespace DevWeb.Biztalk.DeploymentSettings.WebUI.Automapper
{
    public class IntegrationViewProfile : Profile
    {
        public const string ViewModel = "IntegrationViewProfile";

        public override string ProfileName
        {
            get { return ViewModel; }
        }

        protected override void Configure()
        {
            CreateMaps();
        }

        private static void CreateMaps()
        {
            Mapper.CreateMap<Integration, IntegrationViewModel>();

        

            // .ForSourceMember(s => s.IntegrationVersion, t => t.Ignore())


            Mapper.CreateMap<IntegrationViewModel, Integration>();
              

            Mapper.CreateMap<IQueryable<IntegrationViewModel>, IQueryable<Integration>>();
            Mapper.CreateMap<IQueryable<IntegrationViewModel>, IQueryable<Integration>>();
        }
    }
}